const rulesCreator = (column) => {
    const actionMap = {
        text: '填写',
        textarea: '填写',
        combo: '选择',
        date: '选择',
        radio: '选择',
        check: '选择',
        attachment: '上传'
    }
    const rules = []
    if(JSON.parse(column.ismust)) {
        rules.push({
            required: true,
            errorMessage: `请${actionMap[column.columnFormat]}${column.columnDesc}`
        })
    }
    return rules
}

export default rulesCreator